package cn.cvs.controller.sysRole;

import cn.cvs.pojo.SysRole;
import cn.cvs.service.sysRole.SysRoleService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/role")
public class SysRoleController {

    private Logger logger=Logger.getLogger(SysRoleController.class);
    @Autowired
    private SysRoleService sysRoleService;

    @RequestMapping("/list")
    public String getRoleList(Model model){
        List<SysRole> roleList = sysRoleService.getRoleList();
        model.addAttribute("roleList",roleList);
        return "sysRole/list";
    }
}
